/*
 * @Author: yanyufengqing 1624478125@qq.com
 * @Date: 2025-10-03 16:31:59
 * @LastEditors: yanyufengqing 1624478125@qq.com
 * @LastEditTime: 2025-10-03 16:41:27
 * @FilePath: \manage-system\src\api\index.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
// 导入请求工具
import request from '@/utils/request';
// 导入API数据类型定义
import type { TableResponse, UserResponse, RoleResponse } from '@/types/api.d';

// 获取表格数据
export const fetchData = () => {
  return request({
    url: './mock/table.json',
    method: 'get',
  });
};

// 获取用户数据
export const fetchUserData = (params?: { page?: number; size?: number }) => {
  return request({
    url: '/mock/user.json',
    method: 'get',
    params
  });
};

// 获取角色数据
export const fetchRoleData = () => {
  return request({
    url: './mock/role.json',
    method: 'get',
  });
};